package com.atmc.feign;

import com.atmc.entity.ResponseResult;
import com.atmc.entity.User;
import com.atmc.feign.Impl.GlobalFeignServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

@Component
@FeignClient(value = "cloud-provider-service",fallback = GlobalFeignServiceImpl.class)
public interface GlobalFeignService {

    @PostMapping("/user-selectOne/{userName}")
    public User selectOne(@PathVariable("userName") String userName);

    @RequestMapping(value = "/userById/{user_id}",method = RequestMethod.GET)
    public User userselectById(@PathVariable("user_id") Long user_id);

    @GetMapping("/test")
    public ResponseResult test();

//    public ResponseResult testBlanckHandler();
}
